package com.woniuxy.profile.mapper;


import com.woniuxy.commons.dto.ProfileDto;
import com.woniuxy.commons.entity.Profile;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author: dengzj
 * @Description:档案
 * @Date: Created in 14:34 2020/7/28
 */
@Mapper
@Repository
public interface ProfileMapper {
    /*
    *@Author: dengzj
    *@Description: 添加用户档案
    *@Date: 14:36 2020/7/28
    */
    int insertProfile(Profile profile);
    /*
    *@Author: dengzj
    *@Description: 查询单个用户档案
    *@Date: 17:30 2020/7/28
    */
    Profile findProfileByUid(int uid);
    /*
    *@Author: dengzj
    *@Description: 修改用户档案
    *@Date: 9:30 2020/7/29
    */
    int updateProfile(Profile profile);
    /*
    *@Author: dengzj
    *@Description: 删除单个用户档案
    *@Date: 9:40 2020/7/29
    */
    int deleteProfile(int uid);
    /*
    *@Author: dengzj
    *@Description: 多条件查询用户档案
    *@Date: 9:51 2020/7/29
    */
    //List<Profile> findProfileByCondition(@Param("profile") Profile profile,@Param("index") int index,@Param("pageSize") int pageSize);
    List<Profile> findProfileByCondition(ProfileDto profileDto);
    /*
    *@Author: dengzj
    *@Description: 档案总条数
    *@Date: 15:18 2020/7/31
    */
    int countOfProfile();
    /*
    *@Author: dengzj
    *@Description: 批量删除用户档案
    *@Date: 14:44 2020/7/29
    */
    int deleteProfileBatch(int[] batch);
}
